﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;

namespace PromotionApp.DAL
{
    public class CategoryLastedPostDAL : BaseDAL
    {
         #region Private Variable

        private static CategoryLastedPostDAL _MsCategoryLastedPostDAL = null;

        #endregion

        #region Constructor

        private CategoryLastedPostDAL() : base()
        {

        }

        #endregion

        #region Public Method

        public void UpdateCategoryLastedPost(int categoryId, SqlConnection conn)
        {
            string strStoredProcedure = "MsCategoryLastedPostUpdate";
            List<SqlParameter> list = new List<SqlParameter>();
            list.Add(new SqlParameter("CategoryId", categoryId));
            this._SQLHelper.ExecuteNonQueryTransaction(strStoredProcedure, list, CommandType.StoredProcedure, conn);            
        }

        public static CategoryLastedPostDAL GetInstance()
        {
            if (_MsCategoryLastedPostDAL == null)
                _MsCategoryLastedPostDAL = new CategoryLastedPostDAL();

            return _MsCategoryLastedPostDAL;
        }

        #endregion
    }
}